package main

import "fmt"

/**
* @Author: super
* @Date: 2020-08-11 07:54
* @Description:
**/

func main() {
	func(s string){
		fmt.Println(s)
	}("hello")

	add := func(x, y int) int {
		return x + y
	}
	fmt.Println(add(1,2))


	testArg(func() {
		fmt.Println("world")
	})

	testReturn := testReturn()
	fmt.Println(testReturn(1,2))
}

func testArg(f func()){
	f()
}


func testReturn() func(int, int) int {
	return func(x int, y int) int {
		return x - y
	}
}